package yl.hs.bmipfull.pojo.material;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import yl.hs.bmipfull.annotations.DBField;
import yl.hs.bmipfull.annotations.DBTable;
import yl.hs.bmipfull.annotations.Excel;
import yl.hs.bmipfull.pojo.BaseEntity;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 作用:  采购产品单据信息实体类<br/>
 * 创建时间: 2021年05月19日 17时26分05秒 <br/>
 *
 * @author 吴高丰
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@DBTable(disName = "采购产品单据信息", mapCode = "purchase_receipt")
public class PurchaseReceiptEntity extends BaseEntity {

    /**
     * 主键
     */
    private Long id;
    /**
     * 编号
     */
    @DBField(disName = "采购产品单据信息编号", mapCode = "sn", isSerialNumber = true, isRequire = true, snPrefix = "CGDJ",isExport = true)
    @Excel(name = "入库单号")
    private String sn;
    /**
     * 供应商编号
     */
    @Excel(name = "供应商编号")
    private String supplierSN;
    /**
     * 供应商名称
     */
    @DBField(disName = "供应商名称",isExport = true)
    @Excel(name = "供应商名称")
    private String supplierName;
    /**
     * 供应商名称拼音
     */
    private String supplierNamePY;
    /**
     * 采购合同编号
     */
    @DBField(disName = "采购合同编号")
    private String contractSN;
    /**
     * openid
     */
    private String openId;
    /**
     * 车牌号
     */
    @DBField(disName = "车牌号",isExport = true)
    @Excel(name = "车牌号")
    private String truckPlate;
    /**
     * 原材编号
     */
    @Excel(name = "原材编号")
    private String rmSN;
    /**
     * 原材种类
     */
    @DBField(disName = "原材种类",isExport = true)
    @Excel(name = "原材种类")
    private String rmCate;
    /**
     * 原材名称
     */
    @DBField(disName = "原材名称",isExport = true)
    @Excel(name = "原材名称")
    private String rmName;
    /**
     * 原材规格
     */
    @DBField(disName = "原材规格",isExport = true)
    @Excel(name = "原材规格")
    private String rmSpec;

    /**
     * 原材产地
     */
    @DBField(disName = "原材产地",isExport = true)
    @Excel(name = "原材产地")
    private String brand;
    /**
     * 皮重
     */
    @DBField(disName = "皮重",isExport = true)
    @Excel(name = "皮重")
    private BigDecimal tareWeight = new BigDecimal(0);
    /**
     * 原始皮重
     */
    @DBField(disName = "原始皮重",isExport = true)
    @Excel(name = "原始皮重")
    private BigDecimal orgTareWeight = new BigDecimal(0);
    /**
     * 毛重
     */
    @DBField(disName = "毛重",isExport = true)
    @Excel(name = "毛重")
    private BigDecimal grossWeight = new BigDecimal(0);
    /**
     * 原始毛重
     */
    @DBField(disName = "原始毛重",isExport = true)
    @Excel(name = "原始毛重")
    private BigDecimal orgGrossWeight = new BigDecimal(0);
    /**
     * 净重
     */
    @DBField(disName = "净重",isExport = true)
    @Excel(name = "净重")
    private BigDecimal netWeight = new BigDecimal(0);
    /**
     * 对方重量
     */
    @DBField(disName = "对方重量",isExport = true)
    @Excel(name = "对方重量")
    private BigDecimal orgWeight = new BigDecimal(0);
    /**
     * 折方方量
     */
    @DBField(disName = "折方方量",isExport = true)
    @Excel(name = "折方方量")
    private BigDecimal quantity = new BigDecimal(0);
    /**
     * 折方系数
     */
    @DBField(disName = "折方系数",isExport = true)
    @Excel(name = "折方系数",sort = 13)
    private BigDecimal density = new BigDecimal(0);
    /**
     * 价格
     */
    @DBField(disName = "价格",isExport = true)
    @Excel(name = "价格",sort = 14)
    private BigDecimal price = new BigDecimal(0);
    /**
     * 金额
     */
    @DBField(disName = "金额",isExport = true)
    @Excel(name = "金额",sort = 15)
    private BigDecimal amount = new BigDecimal(0);
    /**
     * 进厂时间
     */
    @DBField(disName = "进厂时间",isExport = true)
    @Excel(name = "进厂时间",sort = 16)
    private Date inTime;
    /**
     * 出厂时间
     */
    @DBField(disName = "出厂时间",isExport = true)
    @Excel(name = "出厂时间",sort = 17,dateFormat = "yyyy-MM-dd")
    private Date outTime;
    /**
     * 扣重
     */
    @DBField(disName = "扣重",isExport = true)
    @Excel(name = "扣重",sort = 18)
    private BigDecimal blockWeight = new BigDecimal(0);
    /**
     * 备注
     */
    @DBField(disName = "备注",isExport = true)
    @Excel(name = "备注",sort = 19)
    private String remark;
    /**
     * 状态
     */
    @Excel
    private Short state = 0;

    @DBField(disName = "是否验收")
    private int checkState;
    /**
     * 打印状态
     */
    private boolean printState;
    /**
     * 打印次数
     */
    @DBField(disName = "打印次数",isExport = true)
    private Short printCount=0;
    /**
     * 组织代码
     */
    private String organizationCode;
    /**
     * 仓库编号
     */
    @Excel(name = "仓库编号")
    private String warehouseSN;
    /**
     * 仓库名称
     */
    @Excel(name = "仓库")
    @DBField(disName = "仓库名称",isExport = true)
    private String warehouseName;

    /**
     * 创建人
     */
    private String creatorName;

    /**
     * 原材规格编号
     */
    private String rmCateSN;

    /**
     * 审核时间
     */
    @DBField(disName = "审核时间",isExport = true)
    private Date reviewTime;
    /**
     * 审核重量
     */
    @DBField(disName = "审核重量",isExport = true)
    @Excel(name="审核重量")
    private BigDecimal reviewWeight = new BigDecimal(0);
    /**
     * 审核数量
     */
    @DBField(disName = "审核数量",isExport = true)
    private BigDecimal reviewQuantity = new BigDecimal(0);
    /**
     * 审核人标识
     */
    private String reviewUserSN;
    /**
     * 审核人姓名
     */
    @DBField(disName = "审核人姓名",isExport = true)
    private String reviewUserName;

    /**
     * 审核标记
     */
    private String reviewFlag;

    /**
     * 审核备注
     */
    @DBField(disName = "审核备注",isExport = true)
    private String reviewRemark;
    private String checkUserSN;
    private String checkUserName;
    private String checkPhoto;
    private Date checkTime;
    @DBField(disName = "签约单位", mapCode = "contractingUnit")
    private String contractingUnit;
    @DBField(disName = "主机入库", mapCode = "inHost")
    private int inHost;
    @DBField(disName = "站别", mapCode = "stationType")
    private String stationType;

    @DBField(disName = "运费审核状态", mapCode = "freightState")
    private short freightState;
    @DBField(disName = "运费审核时间", mapCode = "freightReviewTime")
    private Date freightReviewTime;
    @DBField(disName = "运费审核单价", mapCode = "freightReviewPrice")
    private BigDecimal freightReviewPrice;
    /**
     * 运费单价（生成入库单时带过来的）
     */
    private BigDecimal freightPrice;
    @DBField(disName = "运费审核金额", mapCode = "freightReviewAmount")
    private BigDecimal freightReviewAmount;
    @DBField(disName = "运费审核人编号", mapCode = "freightReviewUserSN")
    private String freightReviewUserSN;
    @DBField(disName = "运费审核人姓名", mapCode = "freightReviewUserName")
    private String freightReviewUserName;
    @DBField(disName = "运费审核备注", mapCode = "freightReviewRemark")
    private String freightReviewRemark;
    @DBField(disName = "费用状态", mapCode = "unloadingState")
    private int unloadingState;
    @DBField(disName = "费用金额", mapCode = "unloadingMoney")
    private BigDecimal unloadingMoney;
    @DBField(disName = "费用单价", mapCode = "unloadingPrice")
    private BigDecimal unloadingPrice;
    @DBField(disName = "装卸方式", mapCode = "unloadingMethod")
    private String unloadingMethod;
    public PurchaseReceiptEntity(String rmCate, String rmName,String rmSpec, BigDecimal netWeight, BigDecimal quantity,Long id) {
        this.rmCate = rmCate;
        this.rmName = rmName;
        this.rmSpec = rmSpec;
        this.netWeight = netWeight;
        this.quantity = quantity;
        this.id = id;
    }
}